﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Mindfor.Web.Modules.Users
{
	/// <summary>
	/// Contains base model data for authentication using login and password.
	/// </summary>
	public class AuthenticateModel
	{
		/// <summary>
		/// Gets or sets user identity. Login by default.
		/// </summary>
		[DisplayName("Логин")]
		[Required(ErrorMessage="Введите логин")]
		[StringLength(255, ErrorMessage="Логин должен быть не длиннее 255 символов")]
		public virtual string Identity { get; set; }

		/// <summary>
		/// Gets or sets password.
		/// </summary>
		[DisplayName("Пароль")]
		[Required(ErrorMessage="Введите пароль")]
		public virtual string Pwd { get; set; }

		/// <summary>
		/// Gets or sets value if user must be remembered.
		/// </summary>
		[DisplayName("Запомнить меня")]
		public virtual bool Remember { get; set; }
	}
}
